import time
while True:
        a=int(input("请输入年份（公元纪年）:"))
        x=int((a-3)%10)
        y=int((a-3)%12)
        s1=["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"]
        s2=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"]
        m=s1[x-1]
        n=s2[y-1]
        print("干支纪年法:",a,m+n+'年')
        if __name__ == "__main__":
                time.sleep(1)
                print( )
        
